NETOBSERV-2097 SDK + PF6 migration#1365
Conversation
|
Skipping CI for Draft Pull Request. |
0f4658e to
11b3cc6
Compare
5abca8c to
55214bb
Compare
49fd44e to
d7b103e
Compare
d7b103e to
62e5349
Compare
|
Rebased without changes |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR is a comprehensive upgrade of the web console from PatternFly v5 to v6, React 17 to React 18, and React Router v5-compat to v6. It updates all component selectors, CSS tokens, typography components, modal implementation, drag-drop library, testing infrastructure, and package dependencies to align with the new framework versions. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
|
|
/ok-to-test |
|
New image: quay.io/netobserv/network-observability-console-plugin:5ae2178
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=5ae2178 make set-plugin-image |
|
/label qe-approved |
|
/ok-to-test |
|
New image: quay.io/netobserv/network-observability-console-plugin:2a198f7
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=2a198f7 make set-plugin-image |
1 similar comment
|
New image: quay.io/netobserv/network-observability-console-plugin:2a198f7
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=2a198f7 make set-plugin-image |
|
New image: quay.io/netobserv/network-observability-console-plugin:e8d3cd5
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=e8d3cd5 make set-plugin-image |
b9c1ec0 to
505fdb4
Compare
|
Rebased without changes Created branch main-pf5 to unlock this PR: https://github.com/netobserv/netobserv-web-console/tree/main-pf5 |
|
New image: quay.io/netobserv/network-observability-console-plugin:efd7955
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=efd7955 make set-plugin-image |
|
New image: quay.io/netobserv/network-observability-console-plugin:096ae89
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=096ae89 make set-plugin-image |
|
New image: quay.io/netobserv/network-observability-console-plugin:8d1d813
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=8d1d813 make set-plugin-image |
|
New image: quay.io/netobserv/network-observability-console-plugin:db89bba
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=db89bba make set-plugin-image |
|
New image: quay.io/netobserv/network-observability-console-plugin:506b580
It will expire in two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=506b580 make set-plugin-image |
|
@jpinsonneau: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
PatternFly 6, React 18, React Router 7, and OpenShift Console SDK 4.22 migration. This branch is rebased on
4.22-refactoring.Slack thread with more details: https://redhat-internal.slack.com/archives/C02939DP5L5/p1773758235406749
Dependencies: #1398 #1417
Cypress followup: #1426
Assisted-by:
claude-4.6-opus-highDependency Updates
OpenShift Console SDK
PatternFly 6
@patternfly/patternfly^5.4.0^6.4.0@patternfly/react-charts^7.4.0^8.0.0@patternfly/react-code-editor^5.4.0^6.0.0@patternfly/react-core^5.4.0^6.4.0@patternfly/react-icons^5.4.0^6.4.0@patternfly/react-styles^5.4.0^6.4.0@patternfly/react-table^5.4.0^6.4.0@patternfly/react-tokens^5.4.0^6.4.0@patternfly/react-topology^5.4.0^6.0.0Added:
@patternfly/react-drag-drop^6.4.0React 18
react^17.0.2^18.3.0react-dom^17.0.2^18.3.0@types/react^17.0.1^18.3.0@types/react-dom^17.0.1^18.3.0createRoot(React 18) instead ofReactDOM.renderchildren?: React.ReactNodeto component interfaces (no longer implicit inReact.FC)React Router 7
react-router5.3.x~7.13.1Removed:
react-router-dom5.3.xreact-router-dom-v5-compat6.11.2@types/react-router5.1.20@types/react-router-dom^5.3.3All imports updated from
react-router-dom-v5-compat→react-router.i18next
i18next^21.8.14~25.6.2react-i18next^11.8.11~16.5.8Testing
@testing-library/react^12.1.5^16.3.2Added:
@testing-library/dom^10.4.1Removed:
@testing-library/react-hooks(included in RTL 16)Webpack & Build
5.75.0^5.100.0webpack-cli5.1.4^5.1.4webpack-dev-server5.2.2^5.2.2Added:
ajv^8.17.0(direct devDep to resolveajv-keywordsv5 peer dep conflict with SDK's nestedajvv6)Other
victory^37.0.0(required for PF6 charts)react-modal(replaced with PF6 native Modal)@openshift-console/plugin-shared(now included in SDK)Automated Codemods Applied
Text/TextContent/TextList/TextListItem→ContentAccordionToggle: movedisExpandedprop toAccordionItemAccordionContent: removedisHiddenpropEmptyStatecomponent refactoring/victorypathpf-v5-*topf-v6-*--pf-t--temp--dev--tbd)TypeScript Error Resolution (All 125 errors fixed)
@rjsf/utils, fixedTFunctionimports, addedchildren?: React.ReactNodeto component interfaces, fixed ForwardRef patterns@rjsf/utilsv5.24.13 with@rjsf/corev5.24.12, fixed template/widget typingplaceholderfrom Select, fixed Label colors (cyan→teal,gold→yellow), replaced Text with Contentpatternfly-charts-theme-dark.cssandpatternfly-theme-dark.cssimports (dark theme now built-in to PF6)react-modalwrapper to native PF6Modal/ModalHeader/ModalBody/ModalFooterCSS / Theme Migration
Dark Mode
dark/lightclass toggles in table CSS; PF6 uses.pf-v6-theme-darkon<html>light-stripped/dark-strippedinto singlestrippedclass usingvar(--pf-t--global--background--color--secondary--default)light-bottom-shadow/dark-bottom-shadowintobottom-shadowusingvar(--pf-t--global--border--color--default)light-bottom-border/dark-bottom-borderintobottom-borderusingvar(--pf-t--global--border--color--default)pf-v5-theme-dark→pf-v6-theme-darkCSS Variable Migration (PF5 → PF6 tokens)
--pf-v5-global--BackgroundColor--100--pf-t--global--background--color--primary--default--pf-v5-global--BackgroundColor--200--pf-t--global--background--color--secondary--default--pf-v5-global--Color--100--pf-t--global--text--color--regular--pf-v5-global--Color--200--pf-t--global--text--color--subtle--pf-v5-global--FontSize--sm--pf-t--global--font--size--sm--pf-v5-global--BorderColor--*--pf-t--global--border--color--default--pf-v5-global--BorderRadius--sm--pf-t--global--border--radius--small--pf-v5-global--primary-color--100--pf-t--global--color--brand--default--pf-v5-global--success-color--100--pf-t--global--color--status--success--default--pf-v5-global--danger-color--100--pf-t--global--color--status--danger--default--pf-v5-global--warning-color--100--pf-t--global--color--status--warning--default--pf-v5-c-*--pf-v6-c-*pf-v5-m-*modifierspf-m-*(no version prefix in PF6)isDarkprop cleanupisDarkprop from:MetricsDonut,MetricsGraph,MetricsGraphWithTotal,ElementPanelMetrics,NetflowTableHeader,NetflowTableisDarkonly inhistogram.tsx(needed forBrushHandleComponentSVG colors andexportToPngbackground)PF6 Component Workarounds
DragDropSort portal target (
modal.tsx)DragDropContainerhardcodesdocument.getElementById('root'), but Console usesid="app"ensureRootElement()that creates a<div id="root">fallbackappendToprop toDragDropContainerNested Accordion expand/collapse (
fields.tsx,dynamic-form.css)<label htmlFor="...">insideAccordionTogglecaused double-click<label>with<span>in the toggle.co-dynamic-form__accordion .pf-v6-c-accordion__item:not(.pf-m-expanded) > .pf-v6-c-accordion__expandable-content { display: none; }Build Tooling
.golangci.ymlfor golangci-lint v2 (node_modules exclusion forflattedGo files)react-routerinstead ofreact-router-dom/react-router-dom-v5-compatChecklist
Tested on OCP 4.22.0-0-2026-04-02-114050-test-ci-ln-vi34h7b-latest
Summary by CodeRabbit
New Features/Enhancements
Bug Fixes
Updates